<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

//$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
$rhDescription="Биллинг Radioheart.ru";
$current_controller=$this->params['controller'];
$current_action=$this->params['action'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $rhDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
        <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin,cyrillic' rel='stylesheet' type='text/css'>	<?php
		echo $this->Html->meta('icon');

		//echo $this->Html->css('cake.generic');
		echo $this->Html->css('../style');

		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
		//echo $this->Html->script('jquery-1.6.4.min');
		echo $this->Html->script('pGenerator.jquery');
		echo $this->Html->script('encr');
		echo $this->Html->script('jquery.md5');
		echo $this->Html->script('jquery.cookie');
		echo $this->Html->script('jquery.placeholder.min');

	?>
        <script type="text/javascript">
            function logo_heartbit()
            {
                $(".logo").animate({ opacity: 0.4 },2000).animate({ opacity: 1 },2000);
            }
            $(document).ready(function(){
		var screen_height=$(window).height();

		$(".billing_not_logged_wrp").css('height',screen_height);
		var div=$('#billing_login_wrapper');
		div.css("top", ($(window).height() - div.height())/2 -43-60  + 'px');
		$("#reload").click(function(){
			$('#captcha').attr('src', $('#captcha').attr('src') + '?' + new Date().getTime())
		    });
                /*
                logo_heartbit();
                var beats=setInterval('logo_heartbit()',4000);
                $(".logo").hover(function(){
                    $(".logo").animate({ opacity: 1 },1000);
                    clearInterval(beats);
                },function(){
                    logo_heartbit();
                    var beats=setInterval('logo_heartbit()',4000); }); */
                $(".billing_order_select_line").click(function(){
                  var id=event.target.id;
                  billing_orders_select_line_delete_class(id);
                  $("#"+id).addClass("billing_order_select_line_current");
                  billing_orders_select_line_hide_all_divs();
                  $("#div_"+id).show();
                });
		$(".billing_sidebar_userinfo").click(function(){
			window.location.href = "<?php echo $this->Html->url(array('controller'=>'users','action'=>'addcredits')); ?>";
		});
            });
            function billing_orders_select_line_delete_class(id)
            {
              $(".billing_order_select_line_current").each(function(index){
                $(this).removeClass("billing_order_select_line_current");
              });
            }
            function billing_orders_select_line_hide_all_divs(){
              $(".billing_order_super_shower").each(function(index){
                $(this).hide();
              });
            }
            function expand(div_numder){
	      rollaup_all();
              $("#order_small_"+div_numder).hide();
              $("#order_full_"+div_numder).show();
	      //при отркытии большого, сначала скрываем все внутренние, потом показываем информацию
	      //billing_orders_select_line_hide_all_divs();
	      var id="order_super_info_link_"+div_numder;
	      $("#"+id).addClass("billing_order_select_line_current");
	      $("#div_"+id).show();
            }
            function rollup(div_numder){
              $("#order_full_"+div_numder).hide();
              $("#order_small_"+div_numder).show();
            }
	    function rollaup_all() {
		$(".billing_orders_full_wrp").each(function(index){
                if($(this).is(":visible"))
		{
			var id=$(this).attr('id');
			id=id.replace("full", "small");
			$(this).hide();
			$("#"+id).show();
		}
              });
	    }
        </script>
</head>
<body>
	<div class="billing_not_logged_wrp">
				<div class="header_line">
				    <div class="logo">
					<a href="http://radioheart.ru" target="_blank"><?php echo $this->Html->image('footer_logo.png');?></a>
				    </div>
		       </div>
		<div class="billing_not_logged_main" id="billing_login_wrapper">
			<table>
				<tr valign="top">
					<td width="232">
						<div class="billing_enter_text">Восстановление пароля</div>
						<div class="users form">
						<?php echo $this->Session->flash('auth'); ?>
						<?php echo $this->Form->create('User'); ?>
						<?php echo $this->Form->input('login',array(
							'label'=>false,
							'placeholder'=>'Логин',
							'required'=>true
							));
							echo $this->Form->input('email',array(
							'label'=>false,
							'placeholder'=>'E-mail',
							'required'=>true
							));
						?>
						<?php echo $this->Form->end(__('Отправить')); ?>
						</div>
					</td>
					<td>
							<div class="billing_enter_text">Забыли пароль?</div>
							<div class="billing_enter_notice">
								Введите в форму ваш логин, а так же е-маил,
                                                                на который был зарегистрирован аккаунт.<br>
                                                                Новый пароль будет выслан вам на почту.
							</div>
                                                        <div class="billing_enter_reg_lnk">
                                                            <?php echo $this->Html->link('Вернуться к авторизации',array('controller' => 'users', 'action' => 'login', 'full_base' => true));?>
                                                        </div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="billing_enter_footer_wrp">
		<div class="billing_enter_footer">
			<div class="billing_enter_copies">
				©  2013  Компания «Radioheart.ru»
			</div>
			<div class="billing_enter_rh_lnk">
				<a href="http://radioheart.ru">Radioheart</a>
			</div>
		</div>
	</div>
</body>
</html>